﻿/************************************************
 * Copyright (C) 2011 东北农业大学(NEAU)
 * 版权所有。
 * 文件名：PurchaseStuffDetail.aspx.cs
 * 版本号：v1.0
 * 文件功能描述：材料管理信息的详细信息
 * 作者：侯建
 * 创建日期：2011.04.18
************************************************/
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Jxym.DBUtility;

namespace Jxym.wlkc2011.Module.Default.server.PurchaseStuff
{
    public partial class PurchaseStuffDetail : System.Web.UI.Page
    {
        
        MsSqlDal<model.PurchaseStuff> icom = new MsSqlDal<model.PurchaseStuff>();
        //MsSqlDal<model.PurchaseStuff> icom = new MsSqlDal<model.PurchaseStuff>();
        MsSqlDal<model.StockRoomStuffType> mpt = new MsSqlDal<model.StockRoomStuffType>();
        //MsSqlDal<model.StockRoomStuffType> mpt = new MsSqlDal<model.StockRoomStuffType>();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.Params["id2"] != null && Request.Params["Type"] != null)
                {
                    int ID = Convert.ToInt32(Request.Params["id2"]);
                    model.PurchaseStuff comModel = icom.GetModel("ID = " + ID, null);
                    this.lblPurchaseTitle.Text = comModel.PurchaseTitle;
                    this.lblAddUser.Text = MyGet.GetUserInfoByID(comModel.PurchasePeople).Name;
                    this.lblPurchaseName.Text = comModel.PurchaseName;
                    this.lblPurchaseContent.Text = comModel.PurchaseContent;
                    this.Reply.Visible = false;
                }
                else
                {
                    int ID = Convert.ToInt32(Request.Params["id2"]);
                    model.PurchaseStuff comModel = icom.GetModel("ID = " + ID, null);
                    this.lblPurchaseTitle.Text = comModel.PurchaseTitle;
                    this.lblAddUser.Text = MyGet.GetUserInfoByID(comModel.PurchasePeople).Name;
                    this.lblPurchaseName.Text = comModel.PurchaseName;
                    this.lblPurchaseContent.Text = comModel.PurchaseContent;
                    this.lblReply.Text = comModel.ExamineContent;
                    this.lblPurchasePeople.Text = MyGet.GetUserInfoByID(comModel.ExaminePeople.ToString()).Name;
                }
            }
        }
    }
}